import React, { Component } from "react";
import "./inCredit.scss";
import { Checkbox } from "antd-mobile";
import { agreements_url } from "@config/Config";
const AgreeItem = Checkbox.AgreeItem;
import themeUtil from "@tools/theme";
import XFButton from "../../../../xfCompontent/xfButton/xfButton";

/**
 * 授信中组件
 */
class InCredit extends Component {
	constructor(props) {
		super(props);
		this.state = {};
	}
	/**
	 * 查看协议
	 */
	gotoXyPage(type) {
		if (type == "1") {
			//点击查看隐私服务协议
			this.props.history.push({
				pathname: "/iframeAgreements",
				state: {
					src: agreements_url + "/privacyAgreement.html",
					title: "永辉金融隐私政策"
				}
			});
		} else {
			this.props.history.push("/serviceAgreementAuthorization");
		}
	}
	render() {
		const { boardContent, xhfAmountInfo, stadus, btnText } = this.props;
		return (
			<div className="xhf-new-index-page-top">
				<div className="quota-box">
					<div className={` ${boardContent ? "contentnotice" : "content"}`}>
						<p>最高授信额度（元）</p>
						<h3>{xhfAmountInfo.maxAmount}</h3>
						<p>30天免息 | 最高5万</p>
						<div className="xhf-index-btn">
							<XFButton isDisabled={true} btText={btnText} />
						</div>
					</div>
				</div>
			</div>
		);
	}
}

export default InCredit;
